<?php
/**
 * WB_CacheFake class
 * 
 * @author Jean-Lou Dupont
 * @version @@package-version@@
 * @id $Id: Fake.php 93 2008-03-06 19:40:44Z jldupont $
 */

// already been included by WB_CacheManager
 //{{include
 #require_once 'web-bloks/CacheClass/CacheClass.php';
 //include}}
 
 class WB_CacheFake
 	extends WB_CacheClass
 {
 	/**
 	 * Constructor
 	 */
	public function __construct( $params = null ) 
	{
		parent::__construct( $params );
	}
	
	// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	// WB_BaseClass
	// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%	
	/**
	 * @see WB_BaseClass::getClassPath
	 */
	public function getClassPath()
	{
		return 'web-bloks/CacheClass';
	}
	/**
	 * @see WB_BaseClass::getClassVersion
	 * @return 
	 */
	public function getClassVersion()
	{
		return '$Id: Fake.php 93 2008-03-06 19:40:44Z jldupont $';
	}
	// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	// WB_CacheClass
	// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%	
	public function isFake() { return true; }
	public function getInfo() { return array(); }
	public static function checkPresence() { return true; }
	public function clearCache() { return true; }

	function add ($key, $val, $exp = 0) { return true; }
	function decr ($key, $amt=1) { return null; }
	function delete ($key, $time = 0) { return false; }
	function get ($key) { return null; }
	function get_multi ($keys) { return array_pad(array(), count($keys), null); }
	function incr ($key, $amt=1) { return null; }
	function replace ($key, $value, $exp=0) { return false; }
	function set ($key, $value, $exp=0){ return true; }
	
 } // end class declaration
 
 WB_CacheManager::register( 'WB_CacheFake' );